cmake_minimum_required(VERSION 2.8.12.2)
project(StudentManager)

set(PROJ_SRC_DIR "${PROJECT_SOURCE_DIR}/src")
set(EXECUTABLE_OUTPUT_PATH "${PROJECT_SOURCE_DIR}/bin")

set(HEADERS
    ${PROJ_SRC_DIR}/config.h
    ${PROJ_SRC_DIR}/clist.h
    )

set(SOURCES
    ${PROJ_SRC_DIR}/main.c
    )

include_directories("${PROJ_SRC_DIR}")
link_directories("${PROJECT_SOURCE_DIR}/lib")

if(NOT MSVC)
    set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O0 -Wall -g -ggdb")
    set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O3 -Wall")
endif()

add_executable(${PROJECT_NAME} ${HEADERS} ${SOURCES})
target_link_libraries(${PROJECT_NAME} clist)
